home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJDEV200.ZIP / include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-08  |  2.0 KB  |  92 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_signal_h_
  3. #define __dj_include_signal_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #include <sys/djtypes.h>
  12.  
  13. /* 256 software interrupts + 32 exceptions = 288 */
  14.  
  15. #define SIGABRT    288
  16. #define SIGFPE    289
  17. #define SIGILL    290
  18. #define SIGSEGV    291
  19. #define SIGTERM    292
  20.  
  21. #define SIG_DFL ((void (*)(int))(0))
  22. #define SIG_ERR    ((void (*)(int))(1))
  23. #define SIG_IGN    ((void (*)(int))(-1))
  24.  
  25. __DJ_pid_t
  26. #undef __DJ_pid_t
  27. #define __DJ_pid_t
  28.  
  29. typedef int sig_atomic_t;
  30.  
  31. int    raise(int _sig);
  32. void    (*signal(int _sig, void (*_func)(int)))(int);
  33.   
  34. #ifndef __STRICT_ANSI__
  35.  
  36. #define SA_NOCLDSTOP    1
  37.  
  38. #define SIGALRM    293
  39. #define SIGHUP    294
  40. #define SIGINT  295
  41. #define SIGKILL    296
  42. #define SIGPIPE    297
  43. #define SIGQUIT    298
  44. #define SIGUSR1    299
  45. #define SIGUSR2    300
  46.  
  47. #define SIG_BLOCK    1
  48. #define SIG_SETMASK    2
  49. #define SIG_UNBLOCK    3
  50.  
  51. typedef struct {
  52.   unsigned long __bits[10]; /* max 320 signals */
  53. } sigset_t;
  54.  
  55. struct sigaction {
  56.   int sa_flags;
  57.   void (*sa_handler)(int);
  58.   sigset_t sa_mask;
  59. };
  60.  
  61. int    kill(pid_t _pid, int _sig);
  62. int    sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact);
  63. int    sigaddset(sigset_t *_set, int _signo);
  64. int    sigdelset(sigset_t *_set, int _signo);
  65. int    sigemptyset(sigset_t *_set);
  66. int    sigfillset(sigset_t *_set);
  67. int    sigismember(const sigset_t *_set, int _signo);
  68. int    sigpending(sigset_t *_set);
  69. int    sigprocmask(int _how, const sigset_t *_set, sigset_t *_oset);
  70. int    sigsuspend(const sigset_t *_set);
  71.  
  72. #ifndef _POSIX_SOURCE
  73.  
  74. #define SIGNOFP 301
  75. #define SIGTRAP 302
  76. #define SIGTIMR 303    /* Internal for setitimer (SIGALRM, SIGPROF) */
  77. #define SIGPROF 304
  78. #define SIGMAX 320
  79.  
  80. #endif /* !_POSIX_SOURCE */
  81. #endif /* !__STRICT_ANSI__ */
  82. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  83.  
  84. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  85. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  86.  
  87. #ifdef __cplusplus
  88. }
  89. #endif
  90.  
  91. #endif /* !__dj_include_signal_h_ */
  92.